home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Win2k Control Panel 1.xpl < prev    next >
Text File  |  2001-04-12  |  2KB  |  93 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="8"
  3. "COUNT"="2"
  4. "TEXT 1"="Edit Path..."
  5. "TEXT 2"="Delete"
  6. "UIPATH"="Appearance\Control Panel\Windows 2000/XP Icons"
  7. "NAME"="Visible Items (User)"
  8. "VERSION"="1.05"
  9. "OSVERSION"="0001011"
  10. "LANGUAGE"="VBScript"
  11. "DESCRIPTION 1"="This plug-in allows you to modify which Control Panel applets that conform to the Windows 2000 specification that you wish to view."
  12. "DESCRIPTION 2"=""
  13. "DESCRIPTION 3"=""
  14. "AUTHOR"="Xteq Systems"
  15. "CONTACTURL"="http://www.xteq.com"
  16. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  17. "COMMENT 1"=" "
  18.  
  19.  
  20. '*** ORIGINAL ***'
  21. sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Control Panel\cpls\"
  22. '"HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\cpls\"
  23.  
  24. Sub Plugin_Initialize 
  25.   iCount=RegEnumValues(sP)
  26.  
  27.   for l=1 to iCount
  28.     s=sP & RegEnumElement(l) 
  29.     s2=RegReadValue(s)
  30.     s3=RegEnumElement(l) & " (" & s2 & ")" 
  31.  
  32.     Call SetUIElement(l,s3)
  33.   next
  34. End Sub
  35.  
  36. Sub Plugin_CheckData(ElementIndex)
  37. End Sub
  38.  
  39. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  40.  if ElementSubIndex>0 then 'OK, user has selected an item
  41.  
  42.     If ElementIndex=1 then 
  43.        'Rename file
  44.  
  45.        s=sP & RegEnumElement(ElementSubIndex)
  46.        sV=RegReadValue(s) 
  47.  
  48.        sV=InputWindow("Change path",sV,1)
  49.  
  50.        if IsEmpty(sV)=false then
  51.           'change it (write REG_EXPAND_SZ)
  52.           Call RegWriteValue(s,sV,4)
  53.           
  54.           'update UI
  55.           s=RegEnumElement(ElementSubIndex) & " (" & sV & ")"
  56.           Call SetUIElement(ElementSubIndex,s)
  57.        end if 
  58.  
  59.     else 
  60.        'Delete!!
  61.  
  62.        s=""
  63.        sV=InputWindow("Enter YES to delete this item",s,1)
  64.        
  65.        bOK=false 
  66.        if IsEmpty(sV)=false then
  67.           if sV="YES" then
  68.              bOK=true
  69.              s=sP & RegEnumElement(ElementSubIndex)
  70.              Call RegDeleteValue(s) 
  71.              Call SetUIElement(ElementSubIndex,"")
  72.           end if 
  73.        end if
  74.  
  75.        if bOK=false then
  76.           Call MsgWarning("Items was not deleted") 
  77.        end if
  78.        
  79.     end if
  80.  
  81.    Call IndicateSettingChange()
  82.  
  83.  else
  84.   Call MsgWarning("No item selected - please select an item first.")
  85.  end if
  86. End Sub
  87.  
  88. Sub Plugin_Terminate 
  89. End Sub
  90.  
  91.  
  92.  
  93.